/* fancyDialog.css */

/* 弹窗外观美化 */
.fancy-dialog {
  border-radius: 16px;
  animation: popup 0.4s ease;
  /* 去掉 --el-dialog-bg-color，改用背景色渐变且不透明 */
  background: linear-gradient(135deg, #e3f2fd, #fce4ec);
  /* 添加下面确保背景不透明 */
  background-repeat: no-repeat;
  background-size: cover;
  /* 加个白色底，避免兼容问题 */
  background-color: #fff;
  padding: 24px 36px;
  box-sizing: border-box;
}

/* 弹入动画 */
@keyframes popup {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 标签样式 */
.fancy-form .el-form-item__label {
  color: #5e35b1;
  font-weight: bold;
  font-size: 14px;
  padding-right: 10px;
  min-width: 110px;
}

/* 表单整体间距 */
.fancy-form .el-form-item {
  margin-bottom: 20px;
}

/* 输入框样式 */
.fancy-input .el-input__inner,
.fancy-input .el-select .el-input__inner {
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 0px solid #ccc;
  font-size: 14px;
  /* padding: 8px 12px; */
  box-sizing: border-box;
}

.fancy-input .el-input__inner:focus,
.fancy-input .el-select:focus-within .el-input__inner {
  border-color: #42a5f5;
  box-shadow: 0 0 6px rgba(66, 165, 245, 0.5);
}

/* 上传图片区域 */
.avatar-uploader {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-uploader .avatar-uploader-icon {
  font-size: 36px;
  color: #a0aec0;
  cursor: pointer;
  transition: color 0.3s ease;
}

.avatar-uploader .avatar-uploader-icon:hover {
  color: #42a5f5;
}

.avatar-uploader img.avatar {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(66, 165, 245, 0.3);
  user-select: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.avatar-uploader img.avatar:hover {
  transform: scale(1.05);
}

/* 编辑器容器 */
.editor {
  border: 1px solid #ccc;
  border-radius: 8px;
  min-height: 300px;
  box-shadow: inset 0 0 8px rgb(0 0 0 / 0.05);
  overflow-y: auto;
  font-size: 14px;
}

/* 按钮样式 */
.fancy-btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 6px;
  padding: 8px 20px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.fancy-btn.cancel {
  background: linear-gradient(to right, #eceff1, #cfd8dc);
  color: #37474f;
  border: none;
  margin-left: 12px;
}

.fancy-btn.confirm {
  background: linear-gradient(to right, #42a5f5, #7e57c2);
  color: #fff;
  border: none;
}

.fancy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 响应式适配（抽屉较小时） */
@media (max-width: 768px) {
  .fancy-dialog {
    padding: 16px 20px;
  }
  .fancy-form .el-form-item__label {
    min-width: 90px;
    font-size: 13px;
  }
  .avatar-uploader img.avatar {
    width: 120px;
    height: 90px;
  }
  .editor {
    min-height: 240px;
  }
}
